home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / comm / vt10029a / part02 / 2.9-2.9A
Text File  |  1990-02-24  |  53KB  |  1,840 lines

  1. Enclosed are the patches to bring version 2.9 of VT100 up to version 2.9A.
  2. These patches are context diffs which may be applied by hand or by using
  3. * patch version 2.0 available from Fish disk # 129 or
  4. * patch version 2.0.1.6 (patchlevel 12) available from Fish disk # 296.
  5. If you use one of the patch programs, make a copy of your current VT100
  6. source (fopr safekeeping), CD to the directory containing the source and
  7. say:
  8.     patch < 2.9-2.9A
  9. where "2.9-2.9A" is the name of this file.
  10.  
  11. These patches fix a number of problems, some of them relatively serious
  12. so I encourage you to apply them as soon as possible.  These patches also
  13. provide a new command STRIP ON/OFF and an equivalent menu option under the
  14. Parity menu.  STRIP will discard parity from data from your host which is
  15. destined for your terminal.  If full-screen editors don't work from your
  16. host (e.g. you're seeing funny things like [0;0H). then try STRIP.
  17.  
  18. If you encounter any problems with VT100, please send e-mail to me.
  19. --
  20. Tony Sumrall   author of VT100 2.9 (and 2.8a and 2.8 and...)
  21. acs@pccuts.pcc.amdahl.com -or- amdahl!pccuts!acs
  22.  
  23. Index: vt100.h
  24. Prereq: 891003)
  25. *** ./vt100.h    Tue Feb 13 09:54:54 1990
  26. --- ../2.9A/vt100.h    Tue Feb 13 09:55:08 1990
  27. ***************
  28. *** 1,7 ****
  29. --- 1,22 ----
  30. + #define HRCSID "$RCSfile: vt100.h,v $ $Revision: 1.4 $"
  31.   /*********************************************************************
  32.    *  a terminal program that has ascii and xmodem transfer capability
  33.    *            :ts=8
  34.    *
  35. +  * $Log:    vt100.h,v $
  36. +  * Revision 1.4  90/02/12  20:23:52  acs
  37. +  * 1) Update date stamp in VERSION for the release of 2.9A.
  38. +  * 2) define HRCSID instead of declaring it static char.
  39. +  * 
  40. +  * Revision 1.3  89/12/19  20:39:14  acs
  41. +  * Updated version and date stamp.
  42. +  * 
  43. +  * Revision 1.2  89/11/06  20:58:52  acs
  44. +  * 1) Support for new STRIP command and menu option.
  45. +  * 2) New window title (date change).
  46. +  * 3) Add RCS id and change log.
  47. +  * 
  48.    *    v2.9 ACS - See change summary.
  49.    *    v2.8a 880331 ACS - Update title to 2.8A.
  50.    *    v2.7 870825 ACS - See README.
  51. ***************
  52. *** 23,29 ****
  53.    ********************************************************************/
  54.   
  55.   /********* major version (used for title of terminal window) *********/
  56. ! #define    VERSION    "VT100 (V2.9 ACS 891003) Terminal Window"
  57.   
  58.   /*********** ########  define the compiler type here ######## ********/
  59.   #define    LATTICE    0
  60. --- 38,44 ----
  61.    ********************************************************************/
  62.   
  63.   /********* major version (used for title of terminal window) *********/
  64. ! #define    VERSION    "VT100 (V2.9A ACS 900212) Terminal Window"
  65.   
  66.   /*********** ########  define the compiler type here ######## ********/
  67.   #define    LATTICE    0
  68. ***************
  69. *** 100,106 ****
  70.   #define EXTMAX 10    /* number of external xfer pgms allowed */
  71.   #define COMMAX 4    /* number of communication sub menus */
  72.   #define RSMAX 5        /* speed menu items */
  73. ! #define PARMAX 5    /* parity items */
  74.   #define XFMAX 4        /* transfer mode items */
  75.   #define SCRIPTMAX 3    /* script menu items */
  76.   #define UTILMAX 12    /* utility menu */
  77. --- 115,121 ----
  78.   #define EXTMAX 10    /* number of external xfer pgms allowed */
  79.   #define COMMAX 4    /* number of communication sub menus */
  80.   #define RSMAX 5        /* speed menu items */
  81. ! #define PARMAX 7    /* parity items */
  82.   #define XFMAX 4        /* transfer mode items */
  83.   #define SCRIPTMAX 3    /* script menu items */
  84.   #define UTILMAX 12    /* utility menu */
  85. ***************
  86. *** 264,270 ****
  87.   extern int    p_foreground,p_background,p_bold,p_cursor,p_lines,p_mode;
  88.   extern int    p_parity,p_volume,p_wrap,p_echo,p_keyapp,p_curapp,p_bs_del;
  89.   extern int    p_xbeep, p_xproto, p_convert,p_autochop, p_kmaxpack, p_unit;
  90. ! extern int    p_fontsize, p_shared, p_mouse_up, p_mouse_down;
  91.   extern char    p_keyscript;
  92.   extern long    p_break;
  93.   extern char    *p_font, *p_device, *p_f[11],*p_F[10];
  94. --- 279,285 ----
  95.   extern int    p_foreground,p_background,p_bold,p_cursor,p_lines,p_mode;
  96.   extern int    p_parity,p_volume,p_wrap,p_echo,p_keyapp,p_curapp,p_bs_del;
  97.   extern int    p_xbeep, p_xproto, p_convert,p_autochop, p_kmaxpack, p_unit;
  98. ! extern int      p_fontsize, p_shared, p_mouse_up, p_mouse_down, p_strip;
  99.   extern char    p_keyscript;
  100.   extern long    p_break;
  101.   extern char    *p_font, *p_device, *p_f[11],*p_F[10];
  102. ***************
  103. *** 325,332 ****
  104.           cmd_ac(), cmd_appcur(), cmd_baud(), cmd_bt(), cmd_conv(),
  105.           cmd_echo(), cmd_exit(), cmd_ext(), cmd_fnc(), cmd_key(),
  106.           cmd_kmode(), cmd_kmaxpk(), cmd_mode(), cmd_mouse(),
  107. !         cmd_numkey(), cmd_parity(), cmd_share(), cmd_short(),
  108. !         cmd_swap(), cmd_wrap(), cmd_xbeep(), cmd_xproto();
  109.   
  110.           /* rexx-only commands */
  111.   extern int    cmd_rx(), cmd_fwd();
  112. --- 340,348 ----
  113.           cmd_ac(), cmd_appcur(), cmd_baud(), cmd_bt(), cmd_conv(),
  114.           cmd_echo(), cmd_exit(), cmd_ext(), cmd_fnc(), cmd_key(),
  115.           cmd_kmode(), cmd_kmaxpk(), cmd_mode(), cmd_mouse(),
  116. !         cmd_numkey(), cmd_parity(), cmd_strip(), cmd_share(),
  117. !         cmd_short(), cmd_swap(), cmd_wrap(), cmd_xbeep(),
  118. !         cmd_xproto();
  119.   
  120.           /* rexx-only commands */
  121.   extern int    cmd_rx(), cmd_fwd();
  122. Index: expand.c
  123. *** ./expand.c    Tue Feb 13 09:54:48 1990
  124. --- ../2.9A/expand.c    Tue Feb 13 09:55:06 1990
  125. ***************
  126. *** 1,7 ****
  127. --- 1,13 ----
  128. + static char rcsid[] = "$RCSfile: expand.c,v $ $Revision: 1.2 $";
  129.   /*************************************************************
  130.    * vt100 terminal emulator - Wild card and Directory support
  131.    *            :ts=8
  132.    *
  133. +  * $Log:    expand.c,v $
  134. +  * Revision 1.2  89/12/19  20:38:41  acs
  135. +  * Added RCS id and change log.
  136. +  * 
  137.    *    v2.9 ACS - See change summary.
  138.    *    v2.7 870825 ACS - Use the *InfoMsg*() routines in window.c rather
  139.    *              than req().
  140. Index: init.c
  141. *** ./init.c    Tue Feb 13 09:54:49 1990
  142. --- ../2.9A/init.c    Tue Feb 13 09:55:06 1990
  143. ***************
  144. *** 1,7 ****
  145. --- 1,27 ----
  146. + static char rcsid[] = "$RCSfile: init.c,v $ $Revision: 1.4 $";
  147.   /***************************************************************
  148.    * vt100 - terminal emulator - initialization
  149.    *                :ts=8
  150.    *
  151. +  * $Log:    init.c,v $
  152. +  * Revision 1.4  89/12/12  22:13:56  acs
  153. +  * 1) Strip excess blanks from the rest of the menu items.
  154. +  * 2) No checkmark on "---" parity item (ParItem[5]).
  155. +  * 
  156. +  * Revision 1.3  89/12/11  20:48:16  acs
  157. +  * 1) Remove extraneous spaces at end of menu items.
  158. +  * 2) Increase width of checked menu items by CHECKWIDTH instead of by
  159. +  *    the width of 2 characters.
  160. +  * 3) Don't highlight the "---" separating the new Strip item from the
  161. +  *    other items in the Parity menu.
  162. +  * 4) A little better initialization of the Utility items.
  163. +  * 
  164. +  * Revision 1.2  89/11/06  21:25:22  acs
  165. +  * 1) Add new Parity menu item: Strip to remove parity from data destined
  166. +  *    for the display.
  167. +  * 2) Add RCS id and change log.
  168. +  * 
  169.    *    v2.9 ACS - Support new cmds EXT.  Use S and R for Send and Receive menu
  170.    *           items instead of ^ and V.  AREXX support.
  171.    *    v2.8a 880331 ACS - Allow lines 0 in init file to *really* mean
  172. ***************
  173. *** 84,91 ****
  174.       char sp;    /* SPace        */
  175.       char ev;    /* EVen            */
  176.       char od;    /* ODd            */
  177. !     char nl;
  178. ! } parcmd_chars = { 'N', ' ', ' ', 'E', 'O', '\0' };
  179.   
  180.   /*   Equivalences for the Xfer Mode sub-menu... */
  181.   struct modcmd {
  182. --- 104,113 ----
  183.       char sp;    /* SPace        */
  184.       char ev;    /* EVen            */
  185.       char od;    /* ODd            */
  186. !     char n0;    /* ---                  */
  187. !     char st;    /* STrip        */
  188. !     char n1;
  189. ! } parcmd_chars = { 'N', ' ', ' ', 'E', 'O', ' ', ' ', '\0' };
  190.   
  191.   /*   Equivalences for the Xfer Mode sub-menu... */
  192.   struct modcmd {
  193. ***************
  194. *** 131,170 ****
  195.   };
  196.   
  197.   static char *modetext[] = {
  198. !     "  Ascii",
  199. !     "  Xmodem",
  200. !     "  XmodemCRC",
  201. !     "  Kermit"
  202.   };
  203.   
  204.   static char *commtext[] = {
  205.       "Baud Rate",
  206. !     "Parity   ",
  207.       "Xfer Mode",
  208. !     "  Shared ",
  209.   };
  210.   
  211.   static char *baudtext[] = {
  212. !     "   300",
  213. !     "  1200",
  214. !     "  2400",
  215. !     "  4800",
  216. !     "  9600"
  217.   };
  218.   
  219.   static char *partext[] = {
  220. !     "  None ",
  221. !     "  Mark ",
  222. !     "  Space",
  223. !     "  Even ",
  224. !     "  Odd  "
  225.   };
  226.   
  227.   static char *modtext[] = {
  228. !     "  Image  ",
  229. !     "  Text   ",
  230. !     "  Convert",
  231. !     "  AutoChop"
  232.   };
  233.   
  234.   static char *scrtext[] = {
  235. --- 153,194 ----
  236.   };
  237.   
  238.   static char *modetext[] = {
  239. !     "Ascii",
  240. !     "Xmodem",
  241. !     "XmodemCRC",
  242. !     "Kermit"
  243.   };
  244.   
  245.   static char *commtext[] = {
  246.       "Baud Rate",
  247. !     "Parity",
  248.       "Xfer Mode",
  249. !     "Shared",
  250.   };
  251.   
  252.   static char *baudtext[] = {
  253. !     " 300",
  254. !     "1200",
  255. !     "2400",
  256. !     "4800",
  257. !     "9600"
  258.   };
  259.   
  260.   static char *partext[] = {
  261. !     "None",
  262. !     "Mark",
  263. !     "Space",
  264. !     "Even",
  265. !     "Odd",
  266. !     "-------",
  267. !     "Strip"
  268.   };
  269.   
  270.   static char *modtext[] = {
  271. !     "Image",
  272. !     "Text",
  273. !     "Convert",
  274. !     "AutoChop"
  275.   };
  276.   
  277.   static char *scrtext[] = {
  278. ***************
  279. *** 178,191 ****
  280.       "Hang Up",
  281.       "Change Dir",
  282.       "Clear Scrn",
  283. !     "  Echo",
  284. !     "  Wrap",
  285. !     "  Num Key",
  286. !     "  App Cur",
  287. !     "  BS<->DEL",
  288. !     "  Xfer Beep",
  289. !     "  Mouse Up",
  290. !     "  Mouse Dn",
  291.   };
  292.   
  293.   struct HowToInit {
  294. --- 202,215 ----
  295.       "Hang Up",
  296.       "Change Dir",
  297.       "Clear Scrn",
  298. !     "Echo",
  299. !     "Wrap",
  300. !     "Num Key",
  301. !     "App Cur",
  302. !     "BS<->DEL",
  303. !     "Xfer Beep ",
  304. !     "Mouse Up",
  305. !     "Mouse Dn",
  306.   };
  307.   
  308.   struct HowToInit {
  309. ***************
  310. *** 211,217 ****
  311.             modtext, (char *)(&modcmd_chars) },
  312.       { 0, 20, ITEMTEXT | ITEMENABLED | HIGHCOMP,
  313.            scrtext, (char *)(&scrcmd_chars) },
  314. !     { 0, 16, ITEMTEXT | ITEMENABLED | HIGHCOMP,
  315.            utiltext, (char *)(&utilcmd_chars) }
  316.   };
  317.   
  318. --- 235,241 ----
  319.             modtext, (char *)(&modcmd_chars) },
  320.       { 0, 20, ITEMTEXT | ITEMENABLED | HIGHCOMP,
  321.            scrtext, (char *)(&scrcmd_chars) },
  322. !     { 0, 16, ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | MENUTOGGLE,
  323.            utiltext, (char *)(&utilcmd_chars) }
  324.   };
  325.   
  326. ***************
  327. *** 591,596 ****
  328. --- 615,621 ----
  329.   *******************************************************************/
  330.   void InitCommItems()
  331.   {
  332. +     struct IntuiText *itext;
  333.       int n;
  334.   
  335.       do_menu_init(CommItem, CommText, COMM_INIT_ENTRY, COMMAX);
  336. ***************
  337. *** 598,603 ****
  338. --- 623,631 ----
  339.       CommItem[1].SubItem = ParItem;
  340.       CommItem[2].SubItem = XFItem;
  341.       CommItem[3].Flags |= CHECKIT | MENUTOGGLE;
  342. +     CommItem[3].Width += CHECKWIDTH;
  343. +     itext = (struct IntuiText *)CommItem[3].ItemFill;
  344. +     itext->LeftEdge = CHECKWIDTH;
  345.       if(p_shared)
  346.       CommItem[3].Flags |= CHECKED;
  347.       else
  348. ***************
  349. *** 632,638 ****
  350.   /*****************************************************************/
  351.   
  352.       do_menu_init(ParItem, ParText, PAR_INIT_ENTRY, PARMAX);
  353. !     for( n=0; n<PARMAX; n++ ) {
  354.       ParItem[n].MutualExclude = (~(1 << n));
  355.       }
  356.   
  357. --- 660,666 ----
  358.   /*****************************************************************/
  359.   
  360.       do_menu_init(ParItem, ParText, PAR_INIT_ENTRY, PARMAX);
  361. !     for( n=0; n<PARMAX-2; n++ ) {
  362.       ParItem[n].MutualExclude = (~(1 << n));
  363.       }
  364.   
  365. ***************
  366. *** 639,644 ****
  367. --- 667,680 ----
  368.       /* select parity item chekced */
  369.       ParItem[p_parity].Flags |= CHECKED;
  370.   
  371. +     if(p_strip)
  372. +     ParItem[PARMAX-1].Flags |= CHECKED;
  373. +     else
  374. +     ParItem[PARMAX-1].Flags &= (-1L ^ CHECKED);
  375. +     ParItem[5].Flags |= HIGHNONE;        /* Don't highlight "----" */
  376. +     ParItem[5].Flags &= (-1L ^ (CHECKIT | MENUTOGGLE));    /* No checkmarks  */
  377.   /*****************************************************************/
  378.   /*    The following initializes the structure arrays         */
  379.   /* initialize text for specific menu items */
  380. ***************
  381. *** 677,689 ****
  382.   /*****************************************************************/
  383.   void InitUtilItems()
  384.   {
  385.       int    n;
  386.   
  387.       do_menu_init(UtilItem, UtilText, UTIL_INIT_ENTRY, UTILMAX);
  388.       /* initialize each menu item and IntuiText with loop */
  389. !     for( n=0; n<UTILMAX; n++ ) {
  390. !     if (n > 3)
  391. !         UtilItem[n].Flags |= CHECKIT | MENUTOGGLE;
  392.       }
  393.   
  394.       if (p_echo)
  395. --- 713,725 ----
  396.   /*****************************************************************/
  397.   void InitUtilItems()
  398.   {
  399. +     struct IntuiText *itext;
  400.       int    n;
  401.   
  402.       do_menu_init(UtilItem, UtilText, UTIL_INIT_ENTRY, UTILMAX);
  403.       /* initialize each menu item and IntuiText with loop */
  404. !     for(n = 0; n < 4; n++) {
  405. !     UtilItem[n].Flags &= (-1L ^ (CHECKIT | MENUTOGGLE));
  406.       }
  407.   
  408.       if (p_echo)
  409. ***************
  410. *** 769,774 ****
  411. --- 805,812 ----
  412.       menuitem[n].LeftEdge = initentry->LeftEdge * Ysize;
  413.       menuitem[n].TopEdge = 10 * n;
  414.       menuitem[n].Width = initentry->Width * Ysize;
  415. +     if(initentry->Flags & CHECKIT)
  416. +         menuitem[n].Width += CHECKWIDTH;
  417.       menuitem[n].Height = 10;
  418.       menuitem[n].Flags = initentry->Flags;
  419.       menuitem[n].MutualExclude = 0;
  420. ***************
  421. *** 787,793 ****
  422.       menutext[n].FrontPen = 0;
  423.       menutext[n].BackPen = 1;
  424.       menutext[n].DrawMode = JAM2;/* render in fore and background */
  425. !     menutext[n].LeftEdge = 0;
  426.       menutext[n].TopEdge = 1;
  427.       menutext[n].ITextFont = NULL;
  428.       menutext[n].NextText = NULL;
  429. --- 825,834 ----
  430.       menutext[n].FrontPen = 0;
  431.       menutext[n].BackPen = 1;
  432.       menutext[n].DrawMode = JAM2;/* render in fore and background */
  433. !     if(menuitem[n].Flags & CHECKIT)
  434. !         menutext[n].LeftEdge = CHECKWIDTH;
  435. !     else
  436. !         menutext[n].LeftEdge = 0;
  437.       menutext[n].TopEdge = 1;
  438.       menutext[n].ITextFont = NULL;
  439.       menutext[n].NextText = NULL;
  440. Index: kermit.c
  441. *** ./kermit.c    Tue Feb 13 09:54:49 1990
  442. --- ../2.9A/kermit.c    Tue Feb 13 09:55:06 1990
  443. ***************
  444. *** 1,7 ****
  445. --- 1,18 ----
  446. + static char rcsid[] = "$RCSfile: kermit.c,v $ $Revision: 1.3 $";
  447.   /*************************************************************
  448.    * vt100 terminal emulator - KERMIT protocol support
  449.    *            :ts=8
  450.    *
  451. +  * $Log:    kermit.c,v $
  452. +  * Revision 1.3  89/11/02  10:28:28  acs
  453. +  * doksend()/dokreceive(): Memory for spackbuf and msgpkt not freed if
  454. +  * filename == "$".
  455. +  * 
  456. +  * Revision 1.2  89/10/25  21:19:54  acs
  457. +  * 1) saybye(): allocate/free msgpkt and spackbuf if necessary.
  458. +  * 2) Add RCS id and change log.
  459. +  * 
  460.    *    v2.9 ACS - Kermit shouldn't NAK packet 0 but timeout waiting for
  461.    *           send-init then NAK if necessary; terminate each packet with
  462.     *           EOL only; don't sendstring("\r") but sendchar() it.
  463. ***************
  464. *** 111,120 ****
  465.       int amount, c, wild;
  466.       char *p, **list = NULL;
  467.   
  468. -     msgpkt    = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  469. -     spackbuf  = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  470.       sending = 1;
  471.       if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
  472.       p = file;
  473.       while(*p && *p != '*' && *p != '?') p++;
  474.       if (*p) {
  475. --- 122,131 ----
  476.       int amount, c, wild;
  477.       char *p, **list = NULL;
  478.   
  479.       sending = 1;
  480.       if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
  481. +     msgpkt    = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  482. +     spackbuf  = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  483.       p = file;
  484.       while(*p && *p != '*' && *p != '?') p++;
  485.       if (*p) {
  486. ***************
  487. *** 170,180 ****
  488.   {
  489.       int retval;
  490.   
  491. -     msgpkt    = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  492. -     spackbuf  = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  493.       ttime = TTIME_KERMIT;
  494.       sending = 0;
  495.       if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
  496.       strcpy(filnam, file);
  497.       if (server) strcpy(mainmode,"GET");
  498.       else        strcpy(mainmode,"RECV");
  499. --- 181,191 ----
  500.   {
  501.       int retval;
  502.   
  503.       ttime = TTIME_KERMIT;
  504.       sending = 0;
  505.       if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
  506. +     msgpkt    = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  507. +     spackbuf  = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  508.       strcpy(filnam, file);
  509.       if (server) strcpy(mainmode,"GET");
  510.       else        strcpy(mainmode,"RECV");
  511. ***************
  512. *** 992,1006 ****
  513.   void
  514.   saybye()
  515.   {
  516. !    int len,num;
  517.   
  518. !    if(msgpkt == NULL)    /* No msgpkt buffer... */
  519. !     return;        /* ...so just return.  */
  520.   
  521.      if(numreqs != 0)    /* Requester's up... */
  522.       Delay(5L);    /* ...so wait for Intuition, just in case. */
  523.      spack('G',n,1,"F");  /* shut down server no more files */
  524.      rpack(&len,&num,ackpkt);
  525.   }
  526.   
  527.   static void
  528. --- 1003,1029 ----
  529.   void
  530.   saybye()
  531.   {
  532. !    int len, num, gotbuf = 0;
  533.   
  534. !    if(msgpkt == NULL) {    /* No msgpkt buffer, create one */
  535. !     msgpkt    = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  536. !     spackbuf  = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
  537. !         if(msgpkt == NULL || spackbuf == NULL) {
  538. !         InfoMsg1Line("KERMIT: Insufficient free memory, BYE bypassed");
  539. !         return;
  540. !     }
  541. !     gotbuf = 1;
  542. !     }
  543.   
  544.      if(numreqs != 0)    /* Requester's up... */
  545.       Delay(5L);    /* ...so wait for Intuition, just in case. */
  546.      spack('G',n,1,"F");  /* shut down server no more files */
  547.      rpack(&len,&num,ackpkt);
  548. +    if(gotbuf) {
  549. +        FreeMem(spackbuf, (long)(MAXLONGPKS+20));
  550. +        FreeMem(msgpkt,   (long)(MAXLONGPKS+20));
  551. +        msgpkt = spackbuf = NULL;
  552. +    }
  553.   }
  554.   
  555.   static void
  556. Index: remote.c
  557. *** ./remote.c    Tue Feb 13 09:54:51 1990
  558. --- ../2.9A/remote.c    Tue Feb 13 09:55:07 1990
  559. ***************
  560. *** 1,7 ****
  561. --- 1,23 ----
  562. + static char rcsid[] = "$RCSfile: remote.c,v $ $Revision: 1.4 $";
  563.   /****************************************************
  564.    * vt100 emulator - remote character interpretation
  565.    *        :ts=8
  566.    *
  567. +  * $Log:    remote.c,v $
  568. +  * Revision 1.4  89/12/18  20:44:21  acs
  569. +  * doremote() no longer needs to strip parity...the main loop in vt100.c
  570. +  * takes care of it now.
  571. +  * 
  572. +  * Revision 1.3  89/11/02  10:13:38  acs
  573. +  * doremote(): strip parity from data destined for display if user has
  574. +  * requested it (p_strip is set).
  575. +  * 
  576. +  * Revision 1.2  89/11/01  20:28:42  acs
  577. +  * 1) Correct use of Ysize in coordinate calculation.  Thanks to Sean
  578. +  *    Hogan (sean2@garfield.mun.ca).
  579. +  * 2) Add RCS id and change log.
  580. +  * 
  581.    *    V2.9 ACS - CAN was not cancelling a control sequence (thanks
  582.    *           to Bill Kinnersly.
  583.    *    V2.8          Insert/delete character (@/P) by John Wang
  584. ***************
  585. *** 201,207 ****
  586.         case 'H': case 'f':        /* Cursor position */
  587.       if (p[0] <= 0) p[0] = 1;
  588.       if (p[1] <= 0) p[1] = 1;
  589. !     y = (--p[0]*Ysize)+MINY; x = (--p[1]*Ysize)+MINX;
  590.       if (y > MAXY) y = MAXY;
  591.       if (x > MAXX) x = MAXX;
  592.       if (y < MINY) y = MINY;
  593. --- 217,223 ----
  594.         case 'H': case 'f':        /* Cursor position */
  595.       if (p[0] <= 0) p[0] = 1;
  596.       if (p[1] <= 0) p[1] = 1;
  597. !     y = (--p[0]*Ysize)+MINY; x = (--p[1]*Xsize)+MINX;
  598.       if (y > MAXY) y = MAXY;
  599.       if (x > MAXX) x = MAXX;
  600.       if (y < MINY) y = MINY;
  601. Index: rexx.c
  602. *** ./rexx.c    Tue Feb 13 09:54:51 1990
  603. --- ../2.9A/rexx.c    Tue Feb 13 09:55:07 1990
  604. ***************
  605. *** 1,7 ****
  606. --- 1,13 ----
  607. + static char rcsid[] = "$RCSfile: rexx.c,v $ $Revision: 1.2 $";
  608.   /*************************************************************
  609.    * vt100 terminal emulator - AREXX support
  610.    *                :ts=8
  611.    *
  612. +  * $Log:    rexx.c,v $
  613. +  * Revision 1.2  89/12/19  20:38:59  acs
  614. +  * Added RCS id and change log.
  615. +  * 
  616.    *    v2.9 ACS - New with this version.
  617.    *
  618.    *************************************************************/
  619. Index: script.c
  620. *** ./script.c    Tue Feb 13 09:54:52 1990
  621. --- ../2.9A/script.c    Tue Feb 13 09:55:07 1990
  622. ***************
  623. *** 1,7 ****
  624. --- 1,29 ----
  625. + static char rcsid[] = "$RCSfile: script.c,v $ $Revision: 1.5 $";
  626.   /*************************************************************
  627.    * vt100 terminal emulator - Script file support
  628.    *                :ts=8
  629.    *
  630. +  * $Log:    script.c,v $
  631. +  * Revision 1.5  89/12/14  20:32:10  acs
  632. +  * Wasn't beeping after a transfer using external protocols.
  633. +  * 
  634. +  * Revision 1.4  89/12/11  20:35:04  acs
  635. +  * 1) do_script_cmd(): if(CmdFromRexx) should return a value.  Thanks to
  636. +  *    William Dimm (wdimm@lehi3b15.csee.Lehigh.EDU).
  637. +  * 2) cmd_ext(): After successfully deleting an external protocol it should
  638. +  *    return CMDOK.  Thanks again, William!
  639. +  * 3) Displaynames for external protocols no longer need 2 spaces before
  640. +  *    the name.
  641. +  * 
  642. +  * Revision 1.3  89/11/02  10:27:06  acs
  643. +  * New command: STRIP which will strip parity from data destined for
  644. +  * display.
  645. +  * 
  646. +  * Revision 1.2  89/11/01  15:32:54  acs
  647. +  * 1) Make cmd_from_script accessible to other source modules.
  648. +  * 2) Add RCS id and change log.
  649. +  * 
  650.    *    v2.9 ACS - Add support for font size, external transfer program
  651.    *           support, new ASIS option to LACE cmd and AREXX support.
  652.    *    v2.8a 880331 ACS - Allow comments on XPROTO and FONT.
  653. ***************
  654. *** 142,147 ****
  655. --- 164,170 ----
  656.   cmd_sendf,    "sendfile",    5, SCRIPT,    /* send a file to host        */
  657.   cmd_share,    "shareserial",    5, INIT|SCRIPT,    /* ShareSerial device        */
  658.   cmd_short,    "shortcut",    3, INIT,    /* Set shortcuts        */
  659. + cmd_strip,    "strip",    2, INIT|SCRIPT,    /* Strip parity for display    */
  660.   cmd_swap,    "swap",        4, INIT|SCRIPT,    /* Swap BS and DEL        */
  661.   cmd_unit,    "unit",        4, INIT,    /* Unit of serial.device to use */
  662.   cmd_volume,    "volume",    3, INIT,    /* set volume            */
  663. ***************
  664. *** 193,198 ****
  665. --- 216,222 ----
  666.       char sp;    /* SPace        */
  667.       char ev;    /* EVen            */
  668.       char od;    /* ODd            */
  669. +     char st;    /* STrip        */
  670.       char nl;
  671.   } parcmd_chars;
  672.   
  673. ***************
  674. *** 259,264 ****
  675. --- 283,289 ----
  676.       "space", &(parcmd_chars.sp),    /* Set Parity            */
  677.       "even", &(parcmd_chars.ev),        /* Set Parity            */
  678.       "odd", &(parcmd_chars.od),        /* Set Parity            */
  679. +     "strip", &(parcmd_chars.st),    /* Strip parity            */
  680.       "image", &(modcmd_chars.im),    /* KERMIT transfer mode        */
  681.       "text", &(modcmd_chars.tx),        /* KERMIT transfer mode        */
  682.       "convert", &(modcmd_chars.cn),    /* KERMIT transfer mode        */
  683. ***************
  684. *** 284,290 ****
  685.       NULL, NULL
  686.   };
  687.   
  688. ! static int cmd_from_script;        /* != 0 iff cmd from a script    */
  689.   
  690.   
  691.   /********************************************************************/
  692. --- 309,315 ----
  693.       NULL, NULL
  694.   };
  695.   
  696. ! int cmd_from_script;            /* != 0 iff cmd from a script    */
  697.   
  698.   
  699.   /********************************************************************/
  700. ***************
  701. *** 461,467 ****
  702.       script_wait = FALSE;
  703.   
  704.       if(CmdFromRexx)
  705. !     return;
  706.   
  707.       while(fgets(line,256,sf) != NULL) {
  708.          len = strlen(line);
  709. --- 486,492 ----
  710.       script_wait = FALSE;
  711.   
  712.       if(CmdFromRexx)
  713. !     return 0;
  714.   
  715.       while(fgets(line,256,sf) != NULL) {
  716.          len = strlen(line);
  717. ***************
  718. *** 734,740 ****
  719.           NumExts--;
  720.           if(!doing_init)
  721.               InitFileItems();
  722. !         return;
  723.           }
  724.       }
  725.       nxfer = i;            /* Remember index of match or where to put new... */
  726. --- 759,765 ----
  727.           NumExts--;
  728.           if(!doing_init)
  729.               InitFileItems();
  730. !         return CMDOK;
  731.           }
  732.       }
  733.       nxfer = i;            /* Remember index of match or where to put new... */
  734. ***************
  735. *** 781,789 ****
  736.       /* Initialize the new ExternalXfer entry.  Leave room in dispname for
  737.       ** a checkmark (2 character widths). */
  738.       len = strlen(dn);
  739. !     cexp->dispname = (char *)AllocMem((long)len+3, mem_type);
  740. !     strcpy(cexp->dispname, "  ");
  741. !     strcat(cexp->dispname, dn);
  742.       cexp->downname = (char *)AllocMem((long)len+1, mem_type);
  743.       for(i = 0; i < len; i++)
  744.       cexp->downname[i] = dn[i] | ' ';
  745. --- 806,813 ----
  746.       /* Initialize the new ExternalXfer entry.  Leave room in dispname for
  747.       ** a checkmark (2 character widths). */
  748.       len = strlen(dn);
  749. !     cexp->dispname = (char *)AllocMem((long)len+1, mem_type);
  750. !     strcpy(cexp->dispname, dn);
  751.       cexp->downname = (char *)AllocMem((long)len+1, mem_type);
  752.       for(i = 0; i < len; i++)
  753.       cexp->downname[i] = dn[i] | ' ';
  754. ***************
  755. *** 1623,1628 ****
  756. --- 1647,1659 ----
  757.       return CMDFAIL;
  758.   }
  759.   
  760. + cmd_strip(par)
  761. + char    *par;
  762. + {
  763. +     setvar(par,0,&p_strip);
  764. +     return CMDOK;
  765. + }
  766.   cmd_key(par)
  767.   char    *par;
  768.   {
  769. ***************
  770. *** 1777,1781 ****
  771. --- 1808,1814 ----
  772.       if(!p_shared && OpenDevice(mysername,(LONG)p_unit,(struct IORequest *)Read_Request,NULL))
  773.       cleanup("Can't re-open Read device",0);
  774.       setparams();
  775. +     if(p_xbeep)
  776. +     cmd_beep(0L);
  777.       return CMDOK;
  778.   }
  779. Index: vt100.c
  780. *** ./vt100.c    Tue Feb 13 09:54:53 1990
  781. --- ../2.9A/vt100.c    Tue Feb 13 09:55:08 1990
  782. ***************
  783. *** 1,7 ****
  784. --- 1,46 ----
  785. + static char rcsid[] = "$RCSfile: vt100.c,v $ $Revision: 1.8 $";
  786. + static char hrcsid[] = HRCSID;
  787.   /********************************************************************
  788.    *  vt100 terminal emulator with xmodem transfer capability
  789.    *        :ts=8
  790.    *
  791. +  * $Log:    vt100.c,v $
  792. +  * Revision 1.8  90/02/12  20:25:05  acs
  793. +  * Include reference to HRCSID defined in vt100.h.
  794. +  * 
  795. +  * Revision 1.7  90/01/01  21:03:53  acs
  796. +  * 1) do_capture() shouldn't strcpy() to XferredFileName.
  797. +  * 2) do_capture() should use name instead of XferredFileName.
  798. +  * 3) do_send() would only prompt for filename once.
  799. +  * 
  800. +  * Revision 1.6  89/12/18  20:52:38  acs
  801. +  * Strip parity from inbound serial data if p_strip or p_parity is set.
  802. +  * Used to be that this module would only strip parity if p_parity was
  803. +  * set; it was up to subordinate routines to strip parity if p_strip
  804. +  * was set (notably, emit() and doremote()).
  805. +  * 
  806. +  * Revision 1.5  89/12/13  22:02:17  acs
  807. +  * p_bs_del is now based on flag set in selected menu item, too.
  808. +  * 
  809. +  * Revision 1.4  89/12/12  22:18:02  acs
  810. +  * 1) Give selected menu item to handle_menupick().
  811. +  * 2) Base new values of p_* on flags set in selected menu item.
  812. +  * 
  813. +  * Revision 1.3  89/11/06  22:07:46  acs
  814. +  * 1) Used 8 instead of Xsize and Ysize and 6 instead of BaseLine in mouse
  815. +  *    location calculation.  Thanks to Evan Harris (evan@cs.mu.oz.au).
  816. +  * 2) Mouse location routine would call sendchar() with 2 parameters
  817. +  *    (thanks again Evan!).
  818. +  * 3) Support new STRIP command and menu option (p_strip).
  819. +  * 
  820. +  * 
  821. +  * Revision 1.2  89/11/01  20:37:10  acs
  822. +  * 1) Don't poll serial port while executing a script unless we're waiting
  823. +  *    or delaying.
  824. +  * 2) ASCII Capture would only prompt for filename once.
  825. +  * 3) Add RCS id and change log.
  826. +  * 
  827.    *    v2.9 ACS - Only strip parity if parity is enabled; handle external xfer
  828.    *           items in handle_menupick(); new p_interlace value (2).
  829.    *    v2.8a 880331 ACS - Don't ReplyMsg too soon.
  830. ***************
  831. *** 246,251 ****
  832. --- 285,291 ----
  833.   int    p_background    = 0x000;    /* default background RGB color */
  834.   int    p_bold        = 0x000;    /* default BOLD       RGB color */
  835.   int    p_cursor    = 0x00d;    /* default Cursor      RGB color */
  836. + int    p_strip        = 1;    /* Strip parity from data for terminal    */
  837.   int    p_mouse_up    = 0;    /* 1 = send mouse UP events        */
  838.   int    p_mouse_down    = 0;    /* 1 = send mouse DOWN events        */
  839.   int    p_lines        = 0;    /* 0 == use all available (MoreRows)    */
  840. ***************
  841. *** 282,287 ****
  842. --- 322,328 ----
  843.   
  844.   /* for script file */
  845.   extern char on_string[], wait_string[];
  846. + extern int cmd_from_script;        /* in script.c */
  847.   int script_on, script_wait;
  848.   int doing_init = 0;
  849.   
  850. ***************
  851. *** 393,404 ****
  852.       }
  853.   
  854.       /* see if there are any characters from the host */
  855. !     if (CheckIO((struct IORequest *)Read_Request)) {
  856.           register int fwdndx = 0;
  857.           struct MsgPort *FwdPort;
  858.   
  859.           WaitIO((struct IORequest *)Read_Request);
  860. !         c = rs_in[0] & (p_parity ? 0x7F : 0xFF);
  861.   #if AREXX
  862.           fwdchars[fwdndx++] = c;
  863.   #endif
  864. --- 434,449 ----
  865.       }
  866.   
  867.       /* see if there are any characters from the host */
  868. !     if (  (!script_on || (script_on && script_wait)) 
  869. !        && CheckIO((struct IORequest *)Read_Request)) {
  870.           register int fwdndx = 0;
  871.           struct MsgPort *FwdPort;
  872.   
  873.           WaitIO((struct IORequest *)Read_Request);
  874. !         if(p_parity || p_strip)
  875. !         c = rs_in[0] & 0x7f;
  876. !         else
  877. !         c = rs_in[0];
  878.   #if AREXX
  879.           fwdchars[fwdndx++] = c;
  880.   #endif
  881. ***************
  882. *** 421,433 ****
  883.                   dola = 1;
  884.           else
  885.               dola = 0;
  886. !         Read_Request->IOSer.io_Length =
  887. !         Read_Request->IOSer.io_Actual;
  888.           DoIO((struct IORequest *)Read_Request);
  889.           Read_Request->IOSer.io_Length = 1;
  890.   
  891.           for (i = 0; i < actual; i++) {
  892. !             c=rs_in[i] & (p_parity ? 0x7f : 0xff);
  893.   #if AREXX
  894.               if(fwdndx < 255)
  895.               fwdchars[fwdndx++] = c;
  896. --- 466,482 ----
  897.                   dola = 1;
  898.           else
  899.               dola = 0;
  900. !         if(actual > sizeof(lookahead))
  901. !             actual = sizeof(lookahead);
  902. !         Read_Request->IOSer.io_Length = actual;
  903.           DoIO((struct IORequest *)Read_Request);
  904.           Read_Request->IOSer.io_Length = 1;
  905.   
  906.           for (i = 0; i < actual; i++) {
  907. !             if(p_parity || p_strip)
  908. !             c = rs_in[i] & 0x7f;
  909. !             else
  910. !             c = rs_in[i];
  911.   #if AREXX
  912.               if(fwdndx < 255)
  913.               fwdchars[fwdndx++] = c;
  914. ***************
  915. *** 527,533 ****
  916.               unsigned int newcode =
  917.               (Item ? Item->NextSelect : code);
  918.   
  919. !             redo |= handle_menupick(class,code);
  920.               if(code == newcode)
  921.               code = MENUNULL;
  922.               else
  923. --- 576,582 ----
  924.               unsigned int newcode =
  925.               (Item ? Item->NextSelect : code);
  926.   
  927. !             redo |= handle_menupick(class,code, Item);
  928.               if(code == newcode)
  929.               code = MENUNULL;
  930.               else
  931. ***************
  932. *** 558,565 ****
  933.   
  934.               sendstring(p_f[10]);
  935.               sendchar(mouse_qual + '@');
  936. !             sendchar(' ' + ((mouse_x - MINX) / 8),10);  /* column */
  937. !             sendchar(' ' + ((mouse_y - MINY + 6 ) / 8),10);/* row */
  938.           }
  939.           break;
  940.   
  941. --- 607,614 ----
  942.   
  943.               sendstring(p_f[10]);
  944.               sendchar(mouse_qual + '@');
  945. !             sendchar(' ' + ((mouse_x - MINX) / Xsize));  /* column */
  946. !             sendchar(' ' + ((mouse_y - MINY + BaseLine ) / Ysize));/* row */
  947.           }
  948.           break;
  949.   
  950. ***************
  951. *** 570,577 ****
  952.       }   /* end of while ( newmessage )*/
  953.   
  954.       if (!script_wait ||
  955. !        (CheckIO((struct IORequest *)&Script_Timer) &&
  956. !         script_wait == WAIT_TIMER))
  957.           do_script_cmd(NEXTCOMMAND);
  958.   
  959.       while( reqwinup && ((NewMessage = (struct IntuiMessage *)
  960. --- 619,626 ----
  961.       }   /* end of while ( newmessage )*/
  962.   
  963.       if (!script_wait ||
  964. !        (script_wait == WAIT_TIMER &&
  965. !         CheckIO((struct IORequest *)&Script_Timer)))
  966.           do_script_cmd(NEXTCOMMAND);
  967.   
  968.       while( reqwinup && ((NewMessage = (struct IntuiMessage *)
  969. ***************
  970. *** 703,720 ****
  971.   do_capture(file)
  972.   char *file;
  973.   {
  974.       if (capture == TRUE) {
  975.       capture=FALSE;
  976.       fclose(tranr);
  977.       InfoMsg1Line("End File Capture");
  978.       } else {
  979. !     if (file == NULL || *file == '\0') {
  980. !         req("Ascii Capture:",XferredFileName,1);
  981. !     } else
  982. !         strcpy(XferredFileName, file);
  983. !     if ((tranr=fopen(XferredFileName,"w")) == 0) {
  984.           capture=FALSE;
  985. !         InfoMsg2Line("Error Opening File:", XferredFileName);
  986.           return(FALSE);
  987.       }
  988.       capture=TRUE;
  989. --- 752,777 ----
  990.   do_capture(file)
  991.   char *file;
  992.   {
  993. +     char name[MAXGADSTR];
  994.       if (capture == TRUE) {
  995.       capture=FALSE;
  996.       fclose(tranr);
  997.       InfoMsg1Line("End File Capture");
  998.       } else {
  999. !     if(file)
  1000. !         strcpy(name, file);
  1001. !     else
  1002. !         name[0] = '\0';
  1003. !     if (file == NULL || *file == '\0' || !cmd_from_script) {
  1004. !         req("Ascii Capture:",name,1);
  1005. !         if(file && !cmd_from_script)
  1006. !         strcpy(file, name);
  1007. !     }
  1008. !     if ((tranr=fopen(name,"w")) == 0) {
  1009.           capture=FALSE;
  1010. !         InfoMsg2Line("Error Opening File:", name);
  1011.           return(FALSE);
  1012.       }
  1013.       capture=TRUE;
  1014. ***************
  1015. *** 725,742 ****
  1016.   do_send(file)
  1017.   char *file;
  1018.   {
  1019.       if (send == TRUE) {
  1020.       send=FALSE;
  1021.       fclose(trans);
  1022.       InfoMsg1Line("File Send Cancelled");
  1023.       } else {
  1024. !     if (file == NULL || *file == '\0') {
  1025. !         req("Ascii Send:", XferredFileName, 1);
  1026. !     } else
  1027. !         strcpy(XferredFileName, file);
  1028. !     if ((trans=fopen(XferredFileName, "r")) == 0) {
  1029.           send=FALSE;
  1030. !         InfoMsg2Line("Error Opening File:", XferredFileName);
  1031.           return(FALSE);
  1032.       }
  1033.       send=TRUE;
  1034. --- 782,807 ----
  1035.   do_send(file)
  1036.   char *file;
  1037.   {
  1038. +     char name[MAXGADSTR];
  1039.       if (send == TRUE) {
  1040.       send=FALSE;
  1041.       fclose(trans);
  1042.       InfoMsg1Line("File Send Cancelled");
  1043.       } else {
  1044. !     if(file)
  1045. !         strcpy(name, file);
  1046. !     else
  1047. !         name[0] = '\0';
  1048. !     if (file == NULL || *file == '\0' || !cmd_from_script) {
  1049. !         req("Ascii Send:",name,1);
  1050. !         if(file && !cmd_from_script)
  1051. !         strcpy(file, name);
  1052. !     }
  1053. !     if ((trans=fopen(name, "r")) == 0) {
  1054.           send=FALSE;
  1055. !         InfoMsg2Line("Error Opening File:", name);
  1056.           return(FALSE);
  1057.       }
  1058.       send=TRUE;
  1059. ***************
  1060. *** 802,810 ****
  1061.       SetMenuStrip(mywindow,&menu[0]);
  1062.   }
  1063.   
  1064. ! ULONG handle_menupick(class, code)
  1065.   ULONG class;
  1066.   unsigned int code;
  1067.   {
  1068.       unsigned int menunum, itemnum, subnum, i;
  1069.       int nxfer;
  1070. --- 867,876 ----
  1071.       SetMenuStrip(mywindow,&menu[0]);
  1072.   }
  1073.   
  1074. ! ULONG handle_menupick(class, code, Item)
  1075.   ULONG class;
  1076.   unsigned int code;
  1077. + struct MenuItem *Item;
  1078.   {
  1079.       unsigned int menunum, itemnum, subnum, i;
  1080.       int nxfer;
  1081. ***************
  1082. *** 886,894 ****
  1083.           break;
  1084.   
  1085.       case 1:    /* menunum case 1 itemnum 1 -- Set  Parity */
  1086. !         p_parity = subnum;
  1087.           break;
  1088.       case 2:    /* menunum case 1 itemnum 2 -- set transfer mode */
  1089.           switch(subnum) {
  1090.           case 0:
  1091. --- 952,970 ----
  1092.           break;
  1093.   
  1094.       case 1:    /* menunum case 1 itemnum 1 -- Set  Parity */
  1095. !         switch(subnum) {
  1096. !         case 0: case 1: case 2: case 3: case 4:
  1097. !         p_parity = subnum;
  1098. !         break;
  1099. !         case 6:
  1100. !         if(Item->Flags & CHECKED)
  1101. !             p_strip = 1;
  1102. !         else
  1103. !             p_strip = 0;
  1104. !         break;
  1105. !         }
  1106. !         retval |= REDOCOMM;
  1107.           break;
  1108.       case 2:    /* menunum case 1 itemnum 2 -- set transfer mode */
  1109.           switch(subnum) {
  1110.           case 0:
  1111. ***************
  1112. *** 896,911 ****
  1113.           p_mode = subnum;
  1114.           break;
  1115.           case 2:
  1116. !         if (p_convert)
  1117. !             p_convert = 0;
  1118. !         else
  1119.               p_convert = 1;
  1120.           break;
  1121.           case 3:
  1122. !         if(p_autochop)
  1123. !             p_autochop = 0;
  1124. !         else
  1125.               p_autochop = 1;
  1126.           break;
  1127.           }
  1128.           retval |= REDOCOMM;
  1129. --- 972,987 ----
  1130.           p_mode = subnum;
  1131.           break;
  1132.           case 2:
  1133. !         if(Item->Flags & CHECKED)
  1134.               p_convert = 1;
  1135. +         else
  1136. +             p_convert = 0;
  1137.           break;
  1138.           case 3:
  1139. !         if(Item->Flags & CHECKED)
  1140.               p_autochop = 1;
  1141. +         else
  1142. +             p_autochop = 0;
  1143.           break;
  1144.           }
  1145.           retval |= REDOCOMM;
  1146. ***************
  1147. *** 914,923 ****
  1148.           {
  1149.           char onoff[4];
  1150.   
  1151. !         if(p_shared)
  1152. !             strcpy(onoff, "off");
  1153. !         else
  1154.               strcpy(onoff, "on");
  1155.           cmd_share(onoff);
  1156.           }
  1157.           break;
  1158. --- 990,999 ----
  1159.           {
  1160.           char onoff[4];
  1161.   
  1162. !         if(Item->Flags & CHECKED)
  1163.               strcpy(onoff, "on");
  1164. +         else
  1165. +             strcpy(onoff, "off");
  1166.           cmd_share(onoff);
  1167.           }
  1168.           break;
  1169. ***************
  1170. *** 969,1031 ****
  1171.           break;
  1172.   
  1173.       case 4:    /* menunum case 3 itemnum case 4 -- Echo mode */
  1174. !         if (p_echo)
  1175. !         p_echo = 0;
  1176. !         else
  1177.           p_echo = 1;
  1178.           retval |= REDOUTIL;
  1179.           break;
  1180.   
  1181.       case 5:    /* menunum case 3 itemnum case 5 -- Wrap mode */
  1182. !         if (p_wrap)
  1183. !         p_wrap = 0;
  1184. !         else
  1185.           p_wrap = 1;
  1186.           retval |= REDOUTIL;
  1187.           break;
  1188.   
  1189.       case 6:    /* menunum case 3 itemnum case 6 -- NumKey */
  1190. !         if (p_keyapp)
  1191. !         p_keyapp = 0;
  1192. !         else
  1193.           p_keyapp = 1;
  1194.           retval |= REDOUTIL;
  1195.           break;
  1196.   
  1197.       case 7:    /* menunum case 3 itemnum case 7 -- App Cur */
  1198. !         if (p_curapp)
  1199. !         p_curapp = 0;
  1200. !         else
  1201.           p_curapp = 1;
  1202.           retval |= REDOUTIL;
  1203.           break;
  1204.   
  1205.       case 8:    /* menunum case 3 itemnum case 8 -- BS <-> DEL */
  1206. !         swap_bs_del();
  1207.           retval |= REDOUTIL;
  1208.           break;
  1209.   
  1210.       case 9:    /* menunum case 3 itemnum case 9 -- Xfer Beep */
  1211. !         if(p_xbeep)
  1212. !         p_xbeep = 0;
  1213. !         else
  1214.           p_xbeep = 1;
  1215.           retval |= REDOUTIL;
  1216.           break;
  1217.   
  1218.       case 10: /* menunum case 3 itemnum case 10 - Mouse Up */
  1219. !         if(p_mouse_up)
  1220. !         p_mouse_up = 0;
  1221. !         else
  1222.           p_mouse_up = 1;
  1223.           retval |= REDOUTIL;
  1224.           break;
  1225.   
  1226.       case 11: /* menunum case 3 itemnum case 11 - Mouse Down */
  1227. !         if(p_mouse_down)
  1228. !         p_mouse_down = 0;
  1229. !         else
  1230.           p_mouse_down = 1;
  1231.           retval |= REDOUTIL;
  1232.           break;
  1233.       }
  1234. --- 1045,1110 ----
  1235.           break;
  1236.   
  1237.       case 4:    /* menunum case 3 itemnum case 4 -- Echo mode */
  1238. !         if(Item->Flags & CHECKED)
  1239.           p_echo = 1;
  1240. +         else
  1241. +         p_echo = 0;
  1242.           retval |= REDOUTIL;
  1243.           break;
  1244.   
  1245.       case 5:    /* menunum case 3 itemnum case 5 -- Wrap mode */
  1246. !         if(Item->Flags & CHECKED)
  1247.           p_wrap = 1;
  1248. +         else
  1249. +         p_wrap = 0;
  1250.           retval |= REDOUTIL;
  1251.           break;
  1252.   
  1253.       case 6:    /* menunum case 3 itemnum case 6 -- NumKey */
  1254. !         if(Item->Flags & CHECKED)
  1255.           p_keyapp = 1;
  1256. +         else
  1257. +         p_keyapp = 0;
  1258.           retval |= REDOUTIL;
  1259.           break;
  1260.   
  1261.       case 7:    /* menunum case 3 itemnum case 7 -- App Cur */
  1262. !         if(Item->Flags & CHECKED)
  1263.           p_curapp = 1;
  1264. +         else
  1265. +         p_curapp = 0;
  1266.           retval |= REDOUTIL;
  1267.           break;
  1268.   
  1269.       case 8:    /* menunum case 3 itemnum case 8 -- BS <-> DEL */
  1270. !         if(Item->Flags & CHECKED)
  1271. !         p_bs_del = 1;
  1272. !         else
  1273. !         p_bs_del = 0;
  1274.           retval |= REDOUTIL;
  1275.           break;
  1276.   
  1277.       case 9:    /* menunum case 3 itemnum case 9 -- Xfer Beep */
  1278. !         if(Item->Flags & CHECKED)
  1279.           p_xbeep = 1;
  1280. +         else
  1281. +         p_xbeep = 0;
  1282.           retval |= REDOUTIL;
  1283.           break;
  1284.   
  1285.       case 10: /* menunum case 3 itemnum case 10 - Mouse Up */
  1286. !         if(Item->Flags & CHECKED)
  1287.           p_mouse_up = 1;
  1288. +         else
  1289. +         p_mouse_up = 0;
  1290.           retval |= REDOUTIL;
  1291.           break;
  1292.   
  1293.       case 11: /* menunum case 3 itemnum case 11 - Mouse Down */
  1294. !         if(Item->Flags & CHECKED)
  1295.           p_mouse_down = 1;
  1296. +         else
  1297. +         p_mouse_down = 0;
  1298.           retval |= REDOUTIL;
  1299.           break;
  1300.       }
  1301. Index: vt100.doc
  1302. *** ./vt100.doc    Tue Feb 13 09:54:54 1990
  1303. --- ../2.9A/vt100.doc    Tue Feb 13 09:55:08 1990
  1304. ***************
  1305. *** 51,58 ****
  1306.           .
  1307.           .        - externally defined transfer programs
  1308.           .
  1309. !     Send        (A-^)    - Send a file using the selected protocol
  1310. !     Receive        (A-V)    - Receive a file as above
  1311.       Kermit Get    (A-G)    - Get files from a kermit server
  1312.       Kermit Bye    (A-B)    - Finish with the kermit server.
  1313.       Capture            - Log received text to a file.  Changes to
  1314. --- 51,58 ----
  1315.           .
  1316.           .        - externally defined transfer programs
  1317.           .
  1318. !     Send        (A-S)    - Send a file using the selected protocol
  1319. !     Receive        (A-R)    - Receive a file as above
  1320.       Kermit Get    (A-G)    - Get files from a kermit server
  1321.       Kermit Bye    (A-B)    - Finish with the kermit server.
  1322.       Capture            - Log received text to a file.  Changes to
  1323. ***************
  1324. *** 182,191 ****
  1325.   character of the function key definition is the KEYSCRIPT character (e.g.,
  1326.   define F5 as "~df1:foo.script").
  1327.   
  1328. ! During the time script file is running the terminal emulation is still
  1329. ! active and you may type simulataneous to the script file. This may be
  1330. ! desired if your script file is WAITing for a string or is DELAYing for a
  1331. ! period of time etc.
  1332.   
  1333.   AREXX support:
  1334.   --------------
  1335. --- 182,200 ----
  1336.   character of the function key definition is the KEYSCRIPT character (e.g.,
  1337.   define F5 as "~df1:foo.script").
  1338.   
  1339. ! Prior to release 2.9A (a patch release to 2.9), VT100 would interleave
  1340. ! script command execution with the processing of data received from the
  1341. ! serial port.  This made scripts inherently timing dependant.  To remove
  1342. ! this timing dependancy, beginning with 2.9A, VT100 will not receive nor
  1343. ! process data from the serial port while executing a script until the
  1344. ! script issues a WAIT or a DELAY command.  Since the ON command depends
  1345. ! on receipt of serial data, this change will also delay ON command
  1346. ! execution until a WAIT or DELAY is encountered in the script as well.
  1347. ! However, during the time a script file is running terminal emulation is
  1348. ! still active and you may type simulataneous with the execution of the
  1349. ! script file.  This may be desired if your script file is WAITing for a
  1350. ! string or is DELAYing for a period of time etc.  You may, of course,
  1351. ! cancel the execution of a script at any time
  1352.   
  1353.   AREXX support:
  1354.   --------------
  1355. ***************
  1356. *** 673,679 ****
  1357.       EVEN    - Set Parity even          ODD    - Set Parity odd
  1358.       IMAGE   - KERMIT transfer mode     TEXT    - KERMIT transfer mode
  1359.       CONVERT - KERMIT transfer mode     AUTOCHOP    - Enable/disable XMODEM
  1360. !                           auto-chop feature
  1361.                 >> Script items: <<
  1362.       EXECUTE - execute macro        ABORT    - abort macro
  1363.       RX      - send AREXX command
  1364. --- 682,689 ----
  1365.       EVEN    - Set Parity even          ODD    - Set Parity odd
  1366.       IMAGE   - KERMIT transfer mode     TEXT    - KERMIT transfer mode
  1367.       CONVERT - KERMIT transfer mode     AUTOCHOP    - Enable/disable XMODEM
  1368. !     STRIP   - Strip parity of serial          auto-chop feature
  1369. !           data destined for terminal
  1370.                 >> Script items: <<
  1371.       EXECUTE - execute macro        ABORT    - abort macro
  1372.       RX      - send AREXX command
  1373. ***************
  1374. *** 691,696 ****
  1375. --- 701,715 ----
  1376.       SHORTCUT XS             removes the shortcut key for sending via
  1377.                                   XMODEM protocol
  1378.   --------------------------------------------------------------------------
  1379. + STRIP    Strip parity of data destined for terminal    (INIT,SCRIPT)
  1380. +     Format:
  1381. +         STRIP ON/OFF or YES/NO
  1382. +     Example:
  1383. +         STRIP ON    Prior to displaying data from the remote host,
  1384. +             remove the parity.  This will "clean up" displays
  1385. +             from hosts which can't or won't recognize your
  1386. +             parity settings.
  1387. + --------------------------------------------------------------------------
  1388.   SWAP    Swap the meanings of backspace and delete keys    (INIT,SCRIPT)
  1389.       Format:
  1390.       SWAP ON/OFF or YES/NO
  1391. ***************
  1392. *** 742,748 ****
  1393.   --------------------------------------------------------------------------
  1394.   XPROTO    Set default transfer protocol            (INIT,SCRIPT)
  1395.       Format:
  1396. !     XPROTO    XMODEM/XMODEMCRC/KERMIT/an external protocol
  1397.       Example:
  1398.       XPROTO    KERMIT        Sets transfer protocol to Kermit
  1399.   --------------------------------------------------------------------------
  1400. --- 761,767 ----
  1401.   --------------------------------------------------------------------------
  1402.   XPROTO    Set default transfer protocol            (INIT,SCRIPT)
  1403.       Format:
  1404. !     XPROTO    ASCII/XMODEM/XMODEMCRC/KERMIT/an external protocol
  1405.       Example:
  1406.       XPROTO    KERMIT        Sets transfer protocol to Kermit
  1407.   --------------------------------------------------------------------------
  1408. Index: window.c
  1409. *** ./window.c    Tue Feb 13 09:54:55 1990
  1410. --- ../2.9A/window.c    Tue Feb 13 09:55:09 1990
  1411. ***************
  1412. *** 1,7 ****
  1413. --- 1,29 ----
  1414. + static char rcsid[] = "$RCSfile: window.c,v $ $Revision: 1.5 $";
  1415.   /****************************************************
  1416.    * vt100 emulator - window/keyboard support
  1417.    *        :ts=8
  1418.    *
  1419. +  * $Log:    window.c,v $
  1420. +  * Revision 1.5  90/01/23  20:17:11  acs
  1421. +  * 1) Machine would lock up due to req() "missing" some events.  Thanks
  1422. +  *    to Patrick Horgan (phorgan@cup.portal.com) for all his work on
  1423. +  *    this one!
  1424. +  * 2) Remove some extraneous white-space for appearances sake.
  1425. +  * 
  1426. +  * Revision 1.4  89/12/18  20:47:12  acs
  1427. +  * emit() no longer needs to strip parity...the main loop in vt100.c
  1428. +  * takes care of it now.
  1429. +  * 
  1430. +  * Revision 1.3  89/11/02  10:14:24  acs
  1431. +  * Support for new STRIP command to strip parity from data destined for
  1432. +  * display.
  1433. +  * 
  1434. +  * Revision 1.2  89/11/01  20:32:28  acs
  1435. +  * 1) Correct interchanged use of Xsize and Ysize.  Thanks to Sean Hogan
  1436. +  *    (sean2@garfield.mun.ca).
  1437. +  * 2) Add RCS id and change log.
  1438. +  * 
  1439.    *    v2.9 ACS - See change summary.
  1440.    *    v2.7 870825 ACS - Provide an info/status window rather than using
  1441.    *              req().  Better error handling.
  1442. ***************
  1443. *** 88,94 ****
  1444.   #if MANX
  1445.       USHORT RemoveGadget();
  1446.   #endif /* MANX */
  1447. !     int  lprmpt, lname;
  1448.       struct IntuiMessage *Msg;
  1449.   
  1450.       if(reqwinup == 0)
  1451. --- 110,116 ----
  1452.   #if MANX
  1453.       USHORT RemoveGadget();
  1454.   #endif /* MANX */
  1455. !     int  lprmpt, lname, done;
  1456.       struct IntuiMessage *Msg;
  1457.   
  1458.       if(reqwinup == 0)
  1459. ***************
  1460. *** 124,129 ****
  1461. --- 146,152 ----
  1462.       /* Make sure the prompt gets updated */
  1463.       if (numreqs == 1 && strcmp(Prompt,prmpt) != 0) {
  1464.       EndRequest(&myrequest,reqwindow);
  1465. +     done = 0;
  1466.       do {
  1467.           Wait(1L << reqwindow->UserPort->mp_SigBit);
  1468.           while (Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
  1469. ***************
  1470. *** 131,138 ****
  1471.               ReplyMsg((struct Message *)Msg);
  1472.               if(class == NEWSIZE)
  1473.                   ReqNewSize(reqwindow->Height, reqwindow->Width);
  1474.           }
  1475. !     } while (class != REQCLEAR);
  1476.       numreqs = 0;
  1477.       }
  1478.   
  1479. --- 154,163 ----
  1480.               ReplyMsg((struct Message *)Msg);
  1481.               if(class == NEWSIZE)
  1482.                   ReqNewSize(reqwindow->Height, reqwindow->Width);
  1483. +             if(class == REQCLEAR)
  1484. +                 done = 1;
  1485.           }
  1486. !     } while(!done);
  1487.       numreqs = 0;
  1488.       }
  1489.   
  1490. ***************
  1491. *** 154,159 ****
  1492. --- 179,185 ----
  1493.           }
  1494.           else numreqs = 1;
  1495.   
  1496. +         done = 0;
  1497.           do {
  1498.           Wait(1L << reqwindow->UserPort->mp_SigBit);
  1499.           while (Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
  1500. ***************
  1501. *** 163,170 ****
  1502.               numreqs = 0;
  1503.               if(class == NEWSIZE)
  1504.               ReqNewSize(reqwindow->Height, reqwindow->Width);
  1505.           }
  1506. !         } while (class != REQSET);
  1507.       } /* end while numreqs != 0 */
  1508.       } /* end else */
  1509.   
  1510. --- 189,198 ----
  1511.               numreqs = 0;
  1512.               if(class == NEWSIZE)
  1513.               ReqNewSize(reqwindow->Height, reqwindow->Width);
  1514. +             if(class == REQSET)
  1515. +             done = 1;
  1516.           }
  1517. !         } while(!done);
  1518.       } /* end while numreqs != 0 */
  1519.       } /* end else */
  1520.   
  1521. ***************
  1522. *** 174,179 ****
  1523. --- 202,208 ----
  1524.       if((reqwindow->Flags & WINDOWACTIVE) != WINDOWACTIVE) {
  1525.           WindowToFront(reqwindow);
  1526.       ActivateWindow(reqwindow);
  1527. +     done = 0;
  1528.       do {
  1529.           Wait(1L << reqwindow->UserPort->mp_SigBit);
  1530.           while(Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
  1531. ***************
  1532. *** 181,188 ****
  1533.           ReplyMsg((struct Message *)Msg);
  1534.           if(class == NEWSIZE)
  1535.               ReqNewSize(reqwindow->Height, reqwindow->Width);
  1536.           }
  1537. !     } while (class != ACTIVEWINDOW);
  1538.       }
  1539.       
  1540.       /* here is where we pre-select the gadget   */
  1541. --- 210,219 ----
  1542.           ReplyMsg((struct Message *)Msg);
  1543.           if(class == NEWSIZE)
  1544.               ReqNewSize(reqwindow->Height, reqwindow->Width);
  1545. +         if(class == ACTIVEWINDOW)
  1546. +             done = 1;
  1547.           }
  1548. !     } while(!done);
  1549.       }
  1550.       
  1551.       /* here is where we pre-select the gadget   */
  1552. ***************
  1553. *** 198,204 ****
  1554.   
  1555.       /* try once more before giving up... */
  1556.       ActivateGadget(&mystrgad,reqwindow,&myrequest);
  1557. !     }
  1558.   
  1559.       /* wait for input to show up */
  1560.       while (1) {
  1561. --- 229,235 ----
  1562.   
  1563.       /* try once more before giving up... */
  1564.       ActivateGadget(&mystrgad,reqwindow,&myrequest);
  1565. !     }
  1566.   
  1567.       /* wait for input to show up */
  1568.       while (1) {
  1569. ***************
  1570. *** 206,212 ****
  1571.           GetMsg(reqwindow->UserPort)) == FALSE) {
  1572.           Wait(1L<<reqwindow->UserPort->mp_SigBit);
  1573.           continue;
  1574. !         }
  1575.       class = NewMessage->Class;
  1576.       ReplyMsg((struct Message *)NewMessage);
  1577.   
  1578. --- 237,243 ----
  1579.           GetMsg(reqwindow->UserPort)) == FALSE) {
  1580.           Wait(1L<<reqwindow->UserPort->mp_SigBit);
  1581.           continue;
  1582. !     }
  1583.       class = NewMessage->Class;
  1584.       ReplyMsg((struct Message *)NewMessage);
  1585.   
  1586. ***************
  1587. *** 216,224 ****
  1588.       if(class == NEWSIZE)
  1589.           ReqNewSize(reqwindow->Height, reqwindow->Width);
  1590.           
  1591. !     /* maybe this is a menu item to handle */
  1592. ! /*    if (class == MENUPICK) handle_menupick(class,code); */
  1593. !     }
  1594.   
  1595.       /* all done, so return the result */
  1596.       numreqs = 0;
  1597. --- 247,253 ----
  1598.       if(class == NEWSIZE)
  1599.           ReqNewSize(reqwindow->Height, reqwindow->Width);
  1600.           
  1601. !     }
  1602.   
  1603.       /* all done, so return the result */
  1604.       numreqs = 0;
  1605. ***************
  1606. *** 254,264 ****
  1607.       {
  1608.       static char wrap_flag = 0;    /* are we at column 80? */
  1609.   
  1610. -     c &= 0x7F;
  1611.       switch( c )
  1612.       {
  1613.       case '\t':
  1614. !     x += (Ysize * 8) - ((x-MINX) % (Ysize * 8));
  1615.       break;
  1616.   
  1617.       case 10:  /* lf */
  1618. --- 283,292 ----
  1619.       {
  1620.       static char wrap_flag = 0;    /* are we at column 80? */
  1621.   
  1622.       switch( c )
  1623.       {
  1624.       case '\t':
  1625. !     x += (Xsize * 8) - ((x-MINX) % (Xsize * 8));
  1626.       break;
  1627.   
  1628.       case 10:  /* lf */
  1629. ***************
  1630. *** 691,698 ****
  1631.       if(init) {
  1632.       myrequest.LeftEdge = (myrequest.LeftEdge * Xsize) + 5;
  1633.       myrequest.TopEdge  = (myrequest.TopEdge  * Ysize) + 2;
  1634. !     myrequest.Width    = (myrequest.Width    * Ysize) + 4;
  1635. !     myrequest.Height   = (myrequest.Height   * Xsize) + 6;
  1636.   
  1637.       mydonegad.LeftEdge = (mydonegad.LeftEdge * Xsize) + 2;
  1638.       mydonegad.TopEdge  = (mydonegad.TopEdge  * Ysize) + 2;
  1639. --- 719,726 ----
  1640.       if(init) {
  1641.       myrequest.LeftEdge = (myrequest.LeftEdge * Xsize) + 5;
  1642.       myrequest.TopEdge  = (myrequest.TopEdge  * Ysize) + 2;
  1643. !     myrequest.Width    = (myrequest.Width    * Xsize) + 4;
  1644. !     myrequest.Height   = (myrequest.Height   * Ysize) + 6;
  1645.   
  1646.       mydonegad.LeftEdge = (mydonegad.LeftEdge * Xsize) + 2;
  1647.       mydonegad.TopEdge  = (mydonegad.TopEdge  * Ysize) + 2;
  1648. ***************
  1649. *** 701,708 ****
  1650.   
  1651.       mystrgad.LeftEdge  = (mystrgad.LeftEdge * Xsize) + 2;
  1652.       mystrgad.TopEdge   = (mystrgad.TopEdge  * Ysize) + 4;
  1653. !     mystrgad.Width     = (mystrgad.Width    * Ysize) + 0;
  1654. !     mystrgad.Height    = (mystrgad.Height   * Xsize) + 2;
  1655.   
  1656.       donetxt.LeftEdge   = (donetxt.LeftEdge  * Xsize) + 0;
  1657.       donetxt.TopEdge    = (donetxt.TopEdge   * Ysize) + 0;
  1658. --- 729,736 ----
  1659.   
  1660.       mystrgad.LeftEdge  = (mystrgad.LeftEdge * Xsize) + 2;
  1661.       mystrgad.TopEdge   = (mystrgad.TopEdge  * Ysize) + 4;
  1662. !     mystrgad.Width     = (mystrgad.Width    * Xsize) + 0;
  1663. !     mystrgad.Height    = (mystrgad.Height   * Ysize) + 2;
  1664.   
  1665.       donetxt.LeftEdge   = (donetxt.LeftEdge  * Xsize) + 0;
  1666.       donetxt.TopEdge    = (donetxt.TopEdge   * Ysize) + 0;
  1667. Index: xmodem.c
  1668. *** ./xmodem.c    Tue Feb 13 09:54:55 1990
  1669. --- ../2.9A/xmodem.c    Tue Feb 13 09:55:09 1990
  1670. ***************
  1671. *** 1,7 ****
  1672. --- 1,19 ----
  1673. + static char rcsid[] = "$RCSfile: xmodem.c,v $ $Revision: 1.3 $";
  1674.   /*************************************************************
  1675.    * vt100 terminal emulator - XMODEM protocol support
  1676.    *            :ts=8
  1677.    *
  1678. +  * $Log:    xmodem.c,v $
  1679. +  * Revision 1.3  89/12/14  20:33:37  acs
  1680. +  * 1) Use longs for byte count in xmodem transfers.
  1681. +  * 2) Remove commented out code.
  1682. +  * 
  1683. +  * Revision 1.2  89/12/12  13:39:05  acs
  1684. +  * multi_xfer() will pass "$" to called routines.  This means that
  1685. +  * XMODEM_Read_File(), XMODEM_Send_File() and the kermit routines need
  1686. +  * to check for a filename == "$".
  1687. +  * 
  1688.    *    v2.9 ACS - multi_xfer() no longer looks for $ -- kermit does,
  1689.    *           readchar() now infers ttime of 100,000 micros if ttime == 0
  1690.    *           (for newkermit); readchar() doesn't output a TIMED OUT msg
  1691. ***************
  1692. *** 287,292 ****
  1693. --- 299,307 ----
  1694.       unsigned short crc;
  1695.       char    scrstr2[40];
  1696.   
  1697. +     if(strcmp(file, "$") == 0)
  1698. +     return TRUE;
  1699.       bytes_xferred = 0L;
  1700.       ttime = TTIME_SHORT;
  1701.   
  1702. ***************
  1703. *** 320,327 ****
  1704.       }
  1705.   
  1706.       if  (firstchar == SOH) {
  1707. !         sprintf(scrstr2,"%s: Block: %4d Bytes: %d",
  1708. !             p_xproto==2?"XmodemCRC":"Xmodem", sectnum, sectnum*SECSIZ);
  1709.           InfoMsgNoScroll(scrstr2);
  1710.           sectcurr = readchar();
  1711.           if (timeout != GOODREAD)
  1712. --- 335,343 ----
  1713.       }
  1714.   
  1715.       if  (firstchar == SOH) {
  1716. !         sprintf(scrstr2,"%s: Block: %4d Bytes: %ld",
  1717. !             p_xproto==2?"XmodemCRC":"Xmodem", sectnum,
  1718. !             ((long)sectnum)*SECSIZ);
  1719.           InfoMsgNoScroll(scrstr2);
  1720.           sectcurr = readchar();
  1721.           if (timeout != GOODREAD)
  1722. ***************
  1723. *** 363,373 ****
  1724.                   goto exit;
  1725.               } else {
  1726.               errors = 0;
  1727. - /*            sprintf(scrstr2,"Block %4d verified",sectnum); */
  1728.               sectnum++;
  1729.               bufptr += SECSIZ;
  1730.               bytes_xferred += SECSIZ;
  1731. - /*            InfoMsgNoScroll(scrstr2); */
  1732.               if (bufptr == BufSize) {
  1733.                   if (write(fd, bufr, BufSize-SECSIZ) == EOF) {
  1734.                   InfoMsg1Line("XMODEM: Error Writing File");
  1735. --- 379,387 ----
  1736. ***************
  1737. *** 433,438 ****
  1738. --- 447,455 ----
  1739.       unsigned short crc;
  1740.       char    scrstr2[40];
  1741.   
  1742. +     if(strcmp(file, "$") == 0)
  1743. +     return TRUE;
  1744.       bytes_xferred = 0;
  1745.       ttime = TTIME_LONG;
  1746.   
  1747. ***************
  1748. *** 474,481 ****
  1749.       bufptr = 0;
  1750.       while (bytes_to_send > 0 && attempts != RETRYMAX) {
  1751.           attempts = 0;
  1752. !         sprintf(scrstr2,"%s: Sending Block: %4d Bytes: %d",
  1753. !             use_crc?"XmodemCRC":"Xmodem", sectnum, sectnum*SECSIZ);
  1754.           size = SECSIZ <= bytes_to_send ? SECSIZ : bytes_to_send;
  1755.           bytes_to_send -= size;
  1756.           do {
  1757. --- 491,499 ----
  1758.       bufptr = 0;
  1759.       while (bytes_to_send > 0 && attempts != RETRYMAX) {
  1760.           attempts = 0;
  1761. !         sprintf(scrstr2,"%s: Sending Block: %4d Bytes: %ld",
  1762. !             use_crc?"XmodemCRC":"Xmodem", sectnum,
  1763. !             ((long)sectnum)*SECSIZ);
  1764.           size = SECSIZ <= bytes_to_send ? SECSIZ : bytes_to_send;
  1765.           bytes_to_send -= size;
  1766.           do {
  1767. ***************
  1768. *** 514,521 ****
  1769.           } while ((c != ACK) && (attempts != RETRYMAX));
  1770.           bufptr += size;
  1771.           bytes_xferred += size;
  1772. - /*        sprintf(scrstr2,"Sent    block %4d",sectnum);
  1773. -         InfoMsgNoScroll(scrstr2); */
  1774.           sectnum++;
  1775.       }
  1776.       }
  1777. --- 532,537 ----
  1778. ***************
  1779. *** 556,567 ****
  1780.       int status;
  1781.       char *p, *name_start;
  1782.   
  1783.       timeout = USERABORT - 1;
  1784.       for(p=name_start=name; !done && timeout != USERABORT; name_start=++p)
  1785.       {
  1786. -     if (*(name_start+1) == '\0')
  1787. -         return;
  1788.       while(*p == ' ') p++;
  1789.       while(*p && *p != ',' && *p != ' ') p++;
  1790.       if (*p == '\0') {
  1791. --- 572,581 ----
  1792.       int status;
  1793.       char *p, *name_start;
  1794.   
  1795. +     fd = -1;
  1796.       timeout = USERABORT - 1;
  1797.       for(p=name_start=name; !done && timeout != USERABORT; name_start=++p)
  1798.       {
  1799.       while(*p == ' ') p++;
  1800.       while(*p && *p != ',' && *p != ' ') p++;
  1801.       if (*p == '\0') {
  1802. ***************
  1803. *** 573,579 ****
  1804.       *p = '\0';
  1805.   
  1806.       status = ((*mode)(name_start, multi));
  1807. !     if (status == FALSE) close(fd);
  1808.       }
  1809.       server = 0;
  1810.       multi = 0;
  1811. --- 587,593 ----
  1812.       *p = '\0';
  1813.   
  1814.       status = ((*mode)(name_start, multi));
  1815. !     if (status == FALSE && fd >= 0) close(fd);
  1816.       }
  1817.       server = 0;
  1818.       multi = 0;
  1819.